import 'package:flutter/services.dart';

class NativeSendMsgToFlutter {
  static const BasicMessageChannel<dynamic> runTimer = const BasicMessageChannel("send_event_msg_2_flutter_channel", StandardMessageCodec());

  static void initMessageHandler() {
    print("initMessageHandler");
    runTimer.setMessageHandler((dynamic value) {
      // 接收到的时间
      int time = value;
      print("value = $time");

      return null;
    });
  }
}
